package com.hdax.easybuy.controller;

import com.hdax.easybuy.dao.OrderDetailDao;
import com.hdax.easybuy.entity.OrderDetail;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping(value = "/providerOrderDetail")
public class OrderDetailProviderController {

    @Resource
    private OrderDetailDao orderDetailDao;

    @RequestMapping("/getOrderDetailByOrderId/{orderId}")
    public List<OrderDetail> getOrderDetailByOrderId(@PathVariable("orderId")int orderId){

        return orderDetailDao.findByOrderId(orderId);
    }
}
